 

FIC=interface.ml traitement.ml
FIC2=OGL.ml
OCAML=ocamlopt
OCAMLFLAGS= -w a -I +sdl -I +lablgtk2 -I +lablGL -ccopt -L.
OCAMLLD = bigarray.cmxa sdl.cmxa sdlloader.cmxa lablgl.cmxa lablglut.cmxa lablgtk.cmxa

all: intertrait
 
intertrait: trait graph
	ln -sf /usr/lib64/libglut.so.3.9.0 libglut.so
	${OCAML} ${OCAMLFLAGS} ${OCAMLLD} traitement.cmx graph.cmx -o CartographX interface.ml

graph: trait
	ln -sf /usr/lib/libgtkgl-2.0.so.1 libgtkgl-2.0.so
	ln -sf /usr/lib64/libglut.so.3.9.0 libglut.so
	${OCAML} -c ${OCAMLFLAGS} ${OCAMLLD} traitement.cmx  graph.ml

trait:
	ln -sf /usr/lib64/libglut.so.3.9.0 libglut.so
	${OCAML} -c ${OCAMLFLAGS} ${OCAMLLD} traitement.ml

3dim:
	ln -sf /usr/lib64/libglut.so.3.9.0 libglut.so
	${OCAML} ${OCAMLFLAGS} ${OCAMLLD} -o 3D ${FIC2}

clean:
	rm -f *~ *.obj *.o *.cm? *.so CartographX 3D 
 
